package com.jnsw.testkotlin

import android.app.Application
import android.content.Context
import android.os.Handler
import android.support.multidex.MultiDex
import cn.jpush.android.api.JPushInterface



/**

 */

class MyApplication : Application() {
     var appHandle: Handler? = null;
    override fun onCreate() {
        super.onCreate()

        JPushInterface.setDebugMode(true)    // 设置开启日志,发布时请关闭日志
        JPushInterface.init(this)            // 初始化 JPush
        JPushInterface.setAlias(this,1,"admin");
        instance = this
        appHandle = Handler();

    }

    override fun attachBaseContext(base: Context) {
        super.attachBaseContext(base)
        MultiDex.install(this)
    }
    override fun onTerminate() {
        super.onTerminate()
    }

    companion object {

        var instance = MyApplication()
    }

}
